package com.cpp.common.enums;

import lombok.Getter;

@Getter
public enum ResourceType {
    //1`课件`/2`习题`/3`视频`/4`文档`
    COURSE_WARE(1,"课堂演示"),
    EXAM_REVIEW(2,"考试复盘");
//    VIDEO(3,"视频"),
//    DOCUMENT(4,"文档");

    private Integer type;
    private String description;

    ResourceType(Integer type, String description) {
        this.type = type;
        this.description = description;
    }

    public static ResourceType getType(Integer type) {
        for (ResourceType value : ResourceType.values()) {
            if (value.getType().equals(type)) {
                return value;
            }
        }
        return null;
    }

}
